package pangguangjiang.controller;

import com.alibaba.fastjson.JSONArray;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import pangguangjiang.pojo.PGJPojo;
import pangguangjiang.service.PGJservice;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class PangGuangJiangController {
    @Resource
    PGJservice pgJservice;

    @RequestMapping("hello")
    @ResponseBody
    public String hello(){
        List<PGJPojo> list =pgJservice.hello();
        return JSONArray.toJSONString(list);
    }


}
